#include"tou.h"  

void main (int argc,char *argv[]) 
{ 
  char ch[16];
  int a,j,i,x=0;
  int in=open(argv[1],O_RDONLY,0);
  


printf("%07o",0);
     printf(" ");





   while((a=read(in,ch,16))!=0)
   {
     x++;
    
     for(i=0;i<a;i++)
     if(!iscntrl(ch[i]))
     printf("%4x",ch[i]);
     printf("\n");
printf("        ");
     
     for(j=0;j<a;j++)
     if(!iscntrl(ch[j]))
     printf("%4c",ch[j]);
     printf("\n");
     printf("%07o",16*(x-1)+a);
     printf(" ");
     
   }
  close(in);

}
